//prepare new article button
$(function (){
	$("#editor").hide();
    $("#newbtn").click(function(){
    	$("#editor").show();
    	initHtmlBox();
    	$("#newbtn").hide();
    });
    
});


//prepareTextBox
function initHtmlBox(){
	
	//alert($("#mytextbox").css("width")== "420px");
	
	if($("#mytextbox").css("width") =="420px"){
		return;
	}
	
	var htmlbox = $("#mytextbox").css("width",420).css("height",420).htmlbox().button("bold").button("italic").button("underline")
	.separator("dots").button("left").button("center").button("right").button("justify");
	
	htmlbox.init();
	
	$("#savebtn").click(function(){
		//var html = htmlbox.get_html();
		
		hideHtmlBox();
	});
	
}

function hideHtmlBox(){
	alert('hide');
	$("#editor").hide();
	$("#newbtn").show();
}

